import http from '../http'
import { aiLearn } from '../host.js'
const API = {
  getTaskTopic: '/api/v1/taskCenterNew/getQuestionByTaskAndClass',
  getStudentMsg: '/api/v1/taskCenterNew/getQuestionStudent',
  correctRecordList: '/api/v1/taskCenterNew/getGradeRecord',
  correctTask: '/api/v1/taskCenterNew/teacherFeedBack'
}

// 获取任务下的题目（教师批改用）
export async function getTaskTopic(params) {
  return http.get(aiLearn + API.getTaskTopic, {
    params
  })
}

//获取题目下的学生信息（教师批改用）
export async function getStudentMsg(params) {
  return http.get(aiLearn + API.getStudentMsg, {
    params
  })
}

//获取批改记录（分页）
export async function correctRecordList(params) {
  return http.get(aiLearn + API.correctRecordList, {
    params
  })
}

//老师批改
export async function correctTask(data) {
  return http.post(aiLearn + API.correctTask, data, {
    headers: {
      'Content-Type': '	application/json'
    }
  })
}
